#include <iostrem>
#include <string>
using name space std;
int main()
{
    int c = 0;
    string s = "()()(()";
    string stek = "";
    for (char i; s){
        if (i == '(') stek = stek + i;
        else
            if (stek[stek.length()-1] == '(') stek.pop_back();
    }
    if (steck.length() == 0)
        cout << "true";
    else out << "false";
}
